pp108 : Download (FTP)

Download (FTP)

This Web service operation is used to download a file.

SOAP Request
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <download xmlns="http://schemas.cordys.com/ftpconnector/1.1">
            <configuration>ftpserver</configuration>
            <synchronous>true</synchronous>
            <notification-subject>FTP</notification-subject>
            <files>
                <file type="ascii">
                    <source>/readme.txt</source>
                    <target>C:\tempdocs\readme.txt</target>
                </file>
            </files>
        </download>
    </SOAP:Body>
</SOAP:Envelope>

Request Parameters

Parameter

Description

configuration

Name of the Configuration Profile that contains the FTP server details.

synchronous

Specifies if the response must be intimated to the client. This can hold the following values:

  • true - The process will continue without any interruption and the FTP client would wait for the response.
  • false - The event handler will handle the response.

notification-subject

Notification subject on which the user has to subscribe to the Event service, to obtain the status of the request.

files

The files to be downloaded.

file

Details of each file. The type attribute here specifies the type of file to download (ASCII or binary).

  • If you want to specify the binary file type in the request, set the value as bin.
  • If you want to specify the ASCII file type in the request, set the value as ascii.

source

The name of the file to be downloaded.

target

The path where the file is to be downloaded. If this tag is specified, the file is downloaded to the target location specified in this tag.

SOAP Response
<downloadResponse xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <configuration xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">ftpserver</configuration>
    <notification-subject
        xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">FTP</notification-subject>
    <files xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
        <file type="ascii"
            xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
            <source>/readme.txt</source>
            <target>C:\tempdocs\readme.txt</target>
            <statuscode
                xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">226</statuscode>
            <status xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">Transfer complete. </status>
        </file>
    </files>
</downloadResponse>